Release 10.1A: OpenEdge Data Management:
SQL Development
Updating index statistics
The
UPDATE STATISTICScommand uses the following syntax:
The following example demonstrates the use of the
UPDATE STATISTICSstatement for a single table:
The following example updates statistics for indexes and columns for a single employee:
To create the new index statistics for all tables in a database, simply use the statement shown in Example 10–3.
Notes: To create the new index statistics, SQL makes one pass over each index, reading every index entry and counting unique values. This is usually a CPU-intensive operation. When a table has many indexes, this operation can take quite a bit more time than the default
UPDATE STATISTICS.UPDATE STATISTICSdoes not lock user data. It only locks the output statistics rows (and also acquires a shared lock on the schema). This means that user-level transactions can freely run concurrently withUPDATE STATISTICS.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |